Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid test race condition #458

Merged
merged 1 commit into from
May 22, 2020
Merged

Conversation

vdukhovni
Copy link

In a few tests the server's socket is not fully "conditioned" when the client
and server threads start. The server tries to finish socket setup, but this
races against the client thread sending the message, which may be processed by
the kernel with default socket options (observed intermittently in tests on
FreeBSD).

A more complete solution would be to provide setup hooks for the server
setup initialisation, so that the threads don't start until the server
socket is ready. Ideally the socket options can be set before the
server socket is "bound", ensuring that no messages can come in too
early. This is not presently warranted, but perhaps some day...

In a few tests the server's socket is not fully "conditioned" when the client
and server threads start.  The server tries to finish socket setup, but this
races against the client thread sending the message, which may be processed by
the kernel with default socket options (observed intermittently in tests on
FreeBSD).

A more complete solution would be to provide setup hooks for the server
setup initialisation, so that the threads don't start until the server
socket is ready.  Ideally the socket options can be set before the
server socket is "bound", ensuring that no messages can come in too
early.  This is not presently warranted, but perhaps some day...
@kazu-yamamoto kazu-yamamoto self-requested a review May 22, 2020 00:30
Copy link
Collaborator

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kazu-yamamoto kazu-yamamoto merged commit ef42779 into haskell:master May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants